#include <bits/stdc++.h>
#include <string>
using namespace std;

double caculate()
{
    string str;
    cin >> str;
    if (str == "+")
        return caculate() + caculate();
    else if (str == "-")
        return caculate() - caculate();
    else if (str == "*")
        return caculate() * caculate();
    else if (str == "/")
        return caculate() / caculate();
    else return stod(str);
}

int main()
{
    double result = caculate();
    printf("%.2f",result);

    return 0;
}